-- SPDX-License-Identifier: GPL-3.0-or-later

local v_zhengbei = fk.CreateSkill {
  name = "v_zhengbei",
  --技能为锁定技，满足条件后强制发动
  tags = { Skill.Compulsory, },
}

v_zhengbei:addEffect("maxcards", {
  correct_func = function(self, player)
    if player:hasSkill(v_zhengbei.name) then
        local TrickCard = #table.filter(player:getCardIds("h"), function(id)
            return Fk:getCardById(id).type == Card.TypeTrick
        end)
        if TrickCard > 2 then
            return 2
        else
            return TrickCard
        end
    end
  end,
})

return v_zhengbei